<{include file=$module.'/header.php'}>
<style type="text/css">
	#page-manage-order .order-ls-dl img{width:5.5rem; height:4.8rem}
</style>
<div class="page page-current" id="page-manage-order">
	<header class="bar bar-nav common-bar-nav">
		<a class="pull-left back"><i class="fa fa-arrow-left"></i></a>
		<h1 class="title">订单列表<{if $keyword}>(<{$keyword}>)<{/if}></h1>
		<a class="pull-right search-block external" href="/<{$routeUrl}>/search">
			<!-- <i class="fa fa-search"></i> -->
		</a>
	</header>
	<{include file=$module.'/nav.php'}>
	<div class="content">
		<div class="buttons-tab">
			<a href="/<{$routeUrl}>/index?tab=1&keyword=<{$keyword}>" class="external button <{if $tab == 1}>active<{/if}>">新订单</a>
			<a href="/<{$routeUrl}>/index?tab=2&keyword=<{$keyword}>" class="external button <{if $tab == 2}>active<{/if}>">已派单</a>
			<a href="/<{$routeUrl}>/index?tab=3&keyword=<{$keyword}>" class="external button <{if $tab == 3}>active<{/if}>">已接单</a>
			<a href="/<{$routeUrl}>/index?tab=4&keyword=<{$keyword}>" class="external button <{if $tab == 4}>active<{/if}>">维修中</a>
			<a href="javascript:;" class="external button <{if $tab>4}>active<{/if}> open-popover" data-popover=".popover-order-status"><{if $tab>4}><{$orderStatus[$tab]}><{else}>更多<{/if}> <i class="fa fa-arrow-down"></i></a>
		</div>
		
		<div class="order-list pull-to-refresh-content infinite-scroll" data-distance="50">
			<div class="ui-headspace"></div>
			<div class="pull-to-refresh-layer">
				<div class="preloader"></div>
				<div class="pull-to-refresh-arrow"></div>
			</div>

			<ul id="data-list"></ul>
			<div class="infinite-scroll-preloader hide">
				<div class="preloader"></div>
			</div>
		</div>

	</div>
</div>
<div class="popover popover-manage popover-order-status">
	<div class="popover-angle"></div>
	<div class="popover-inner">
		<div class="list-block">
			<ul>
				<li><a href="/<{$routeUrl}>/index?tab=5&keyword=<{$keyword}>" class="external list-button item-link">已完成</a></li>
				<li><a href="/<{$routeUrl}>/index?tab=6&keyword=<{$keyword}>" class="external list-button item-link">已评价</a></li>
				<!-- <li><a href="/<{$routeUrl}>/index?tab=7&keyword=<{$keyword}>" class="external list-button item-link">已结算</a></li> -->
				<li><a href="/<{$routeUrl}>/index?tab=99&keyword=<{$keyword}>" class="external list-button item-link">已取消</a></li>
				<li><a href="javascript:;" class="list-button item-link close-popover">关闭</a></li>
			</ul>
		</div>
	</div>
</div>
<script src="/static/app/js/qcing.js?v=1"></script>
<script>
$(function(){
	//无限滚动
 	$(document).on("pageInit", ".page", function(e, id, page) {
		loaddata("<{$nextpage nofilter}>",$("#data-list"),true, page);
	});
	
 	//
	$(document).on("click", ".order-act", function() {
		var id = $(this).data('id');
		if(!id) {
			return false;
		}
		var status = $(this).data('status');
		$.toast('订单处理中', "/<{$routeUrl}>/order_act?id="+id+"&order_status="+status,500);
		
		// $.confirm('确定操作订单吗', function(){
		// 	$.toast('订单处理中', "/<{$routeUrl}>/order_act?id="+id+"&order_status="+status);
		// 	// $.showPreloader('订单处理中。。。');
		// 	// $.post("/<{$routeUrl}>/order_act", {doids: id, order_status: status}, function(response){
		// 	// 	// var result = $.parseJSON(data);
		// 	// 	if(response.code == 0) {
		// 	// 		$.toast(response.msg);
		// 	// 	} else {
		// 	// 		$.toast(response.msg, response.url);
		// 	// 	}
		// 	// });
		// 	return;
		// });
	});


	$.init();

});
</script>

<{include file=$module.'/footer.php'}>